/*****************************************************************************
 * Please See the declaration in the bottom of this file.
 *
 *
 * Version			Date				Comment
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Init(0)			2007.10.29 
 *****************************************************************************/

#ifndef		__Timer_H__
#define		__Timer_H__



extern void Timer0_Init(unsigned char T0Mode, unsigned int TimerValue);
extern void Timer1_Init(unsigned char T1Mode, unsigned int TimerValue);
extern void Timer2_Init(unsigned char T2Control, unsigned int TimerValue);
extern void Timer0_IntEN(unsigned char T0Priority);
extern void Timer1_IntEN(unsigned char T1Priority);
extern void Timer2_IntEN(unsigned char T2Priority);
extern void Timer0_IntDis(void);
extern void Timer1_IntDis(void);
extern void Timer2_IntDis(void);
extern void SetTimer0Value(unsigned int TimerValue);
extern void SetTimer1Value(unsigned int TimerValue);
extern void SetTimer2Value(unsigned int TimerValue);



//===============================
//MACROs
//===============================
#define  Timer0_Run()		TCON_TR0 = 1;			// Timer 0 run
#define  Timer0_Stop()		TCON_TR0 = 0;			// Timer 0 stop

#define  Timer1_Run()		TCON_TR1 = 1;			// Timer 1 run
#define  Timer1_Stop()		TCON_TR1 = 0;			// Timer 1 stop

#define  Timer2_Stop()		T2CON &= (~MSK_T2CON_T2I);	// Timer 2 stop



#endif









/*****************************************************************************
 * Processor:	SM59R16A2
 * Compiler:	Keil C 2.0
 *
 * Company:	SyncMOS Technologies International,Inc.
 * Author:	Stanley Huang
 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Board:	64-pin demo board (SDB0001A-0)
 * Purpose:
 *
 *
 *****************************************************************************/


